package com.design.pattern.facade;

public class HomeTheaterFacade {
    Amplifier amplifier;
    DvdPlayer dvdPlayer;
    Screen screen;

    public HomeTheaterFacade(Amplifier amplifier, DvdPlayer dvdPlayer, Screen screen) {
        this.amplifier = amplifier;
        this.dvdPlayer = dvdPlayer;
        this.screen = screen;
    }

    public void watchMovie(String movie) {
        amplifier.setVolum(5);
        amplifier.on();
        dvdPlayer.setDvd(movie);
        dvdPlayer.player();
        screen.open();
    }

    public void endMovie() {
        amplifier.close();
        dvdPlayer.close();
        screen.close();
    }

}